import { request } from '@/utils/request.js'

/**
 * 账户流水 API JS
 */

export default {

  /**
   * 获取账户流水分页列表
   * @returns
   */
  getList (params = {}) {
    return request({
      url: 'finance/accountStatement/index',
      method: 'get',
      params
    })
  },

  /**
   * 添加账户流水
   * @returns
   */
  save (data = {}) {
    return request({
      url: 'finance/accountStatement/save',
      method: 'post',
      data
    })
  },

  /**
   * 更新账户流水数据
   * @returns
   */
  update (id, data = {}) {
    return request({
      url: 'finance/accountStatement/update/' + id,
      method: 'put',
      data
    })
  },

  /**
   * 读取账户流水
   * @returns
   */
  read (id) {
    return request({
      url: 'finance/accountStatement/read/' + id,
      method: 'get',
      data
    })
  },

  /**
   * 账户流水导出
   * @returns
   */
  exportExcel (params = {}) {
    return request({
      url: 'finance/accountStatement/export',
      method: 'post',
      responseType: 'blob',
      params
    })
  },


}